package com.example.petshopping.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 上门服务数据模型类
 */
public class Service {
    private String shopName;
    private String avatarUrl;
    private String rating;
    private String fans;
    private String address;
    private String distance;
    private List<ServiceItem> serviceItems;

    public Service() {
        serviceItems = new ArrayList<>();
    }

    public Service(String shopName, String avatarUrl, String rating, String fans, String address, String distance) {
        this.shopName = shopName;
        this.avatarUrl = avatarUrl;
        this.rating = rating;
        this.fans = fans;
        this.address = address;
        this.distance = distance;
        this.serviceItems = new ArrayList<>();
    }

    /**
     * 服务项目数据模型
     */
    public static class ServiceItem {
        private String price;
        private String description;

        public ServiceItem(String price, String description) {
            this.price = price;
            this.description = description;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }

    // Getters and Setters
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getRating() {
        return rating;
    }

    public void setRating(String rating) {
        this.rating = rating;
    }

    public String getFans() {
        return fans;
    }

    public void setFans(String fans) {
        this.fans = fans;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public List<ServiceItem> getServiceItems() {
        return serviceItems;
    }

    public void setServiceItems(List<ServiceItem> serviceItems) {
        this.serviceItems = serviceItems;
    }

    public void addServiceItem(String price, String description) {
        this.serviceItems.add(new ServiceItem(price, description));
    }
} 